import random
count_1 = [''.join(random.choices(bytes(range(97,122)).decode(), k=2)) for i in range(100)]
count_2 = {}
for i in count_1:
    if i not in count_2:
        count_2[i] = 1
    else:
        count_2[i] += 1   
print(sorted(count_2.items(),reverse = True))


# 没有做到按照出现次数排序，可以改进一下
